import React, {Component} from 'react'
import {Platform, StyleSheet, Text, View, Image, ImageBackground, TouchableOpacity, ScrollView, Dimensions, PixelRatio} from 'react-native'
import MinaStyle from '../../assets/css/commonStyle.js'


const orderImage = Image.resolveAssetSource(require('../../assets/imgs/bg_work.png'));
console.info(orderImage);

const deviceWidth = Dimensions.get('window').width;
const deviceHeight = Dimensions.get('window').height;

let pixelRatio = PixelRatio.get();

// const defaultPixel = 2;
// const w2 = 750/defaultPixel;
// const h2 = 4797/defaultPixel;

// const scale = Math.min(deviceHeight/h2, deviceWidth/w2)
console.log(pixelRatio)


type Props = {};
export default class HomeWork extends Component<Props> {
  render() {
    return (
      <View style={MinaStyle.minaContainer}>
        <ScrollView style={styles.scroll}>
          <Image style={styles.image}
             onLayout={(event) => {
               let {width, height}= event.nativeEvent.layout;
               console.log(width)
               console.log(height)
             }}
             source={require('../../assets/imgs/bg_work.png')}>
          </Image>
        </ScrollView>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  homeWork: {
    width: '100%',
  },
  scroll: {

  },
  image: {
    width: '100%',
    resizeMode: 'contain',
    // marginTop: -1218,
    // marginBottom: -1218,
    // marginTop: -1074,
    // marginBottom: -1074,
    // marginTop: -1375,
    // marginBottom: -1375,
    // height: 4797/PixelRatio.get(),
  }
});